package exodus;

/**
 * Created with IntelliJ IDEA.
 * User: JSmith1
 * Date: 7/27/12
 * Time: 12:08 PM
 * An object representing an instance of a water source in Exodus.
 */
public class Water implements Comparable<Water>{
    private String itemid; //a unique item id for identifying a unique instance of this item of water
    private String name; //the name of this type of water item
    private double quantity; //amount of water in quarts
    private double weight; //weight of water in lbs
    private int rads; //amount of radiation in the water

    //constructors
    public Water() {}
    public Water(String itemid, String name, double quantity, double weight, int rads){
        this.itemid = itemid;
        this.name = name;
        this.quantity = quantity;
        this.weight = weight;
        this.rads = rads;
    }

    //getters and setters
    public String getItemid() {
        return itemid;
    }

    public void setItemid(String itemid) {
        this.itemid = itemid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getQuantity() {
        return quantity;
    }

    public void setQuantity(double quantity) {
        this.quantity = quantity;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getRads() {
        return rads;
    }

    public void setRads(int rads) {
        this.rads = rads;
    }

    @Override
    public int compareTo(Water o) {
        return this.itemid.compareTo(o.itemid);
    }

    public boolean equals(Water o){
        return this.itemid.equals(o.getItemid());
    }
}
